﻿using ControlCenter.Model;
using System.Collections.Generic;
using System.Threading.Tasks;
using ControlCenter.Model.BizEntities;

namespace ControlCenter.ApplicationService
{
    /// <summary>
    /// 参数服务接口
    /// </summary>
    public interface IParamService
    {
        /// <summary>
        /// 获取机器人最新版本信息
        /// </summary>
        /// <returns></returns>
        Task<RobotVersionParam> GetRobotVersionParam();

        /// <summary>
        /// 获取执行周期设置
        /// </summary>
        /// <returns></returns>
        Task<List<ExecutionCycleParam>> GetExecutionCycleParam();

        /// <summary>
        /// 获取ERP配置信息
        /// </summary>
        /// <returns></returns>
        Task<ErpApiParam> GetErpApiParam();

        /// <summary>
        /// 根据参数CODE读取参数JSON串
        /// </summary>
        /// <param name="paramCode">参数CODE</param>
        /// <returns></returns>
        Task<string> GetParam(string paramCode);

        /// <summary>
        /// 更新执行周期设置
        /// </summary>
        /// <param name="paramDto">请求参数DTO</param>
        /// <returns></returns>
        Task UpdateExecutionCycleParam(List<ExecutionCycleParam> paramDto);

        /// <summary>
        /// 更新机器人版本信息
        /// </summary>
        /// <param name="paramDto">请求参数DTO</param>
        /// <returns></returns>
        Task UpdateRobotVersionParam(RobotVersionParam paramDto);

        /// <summary>
        /// 更新ERP配置信息
        /// </summary>
        /// <param name="paramDto">请求参数DTO</param>
        /// <returns></returns>
        Task UpdateErpApiParam(ErpApiParam paramDto);
    }
}
